<script setup>
import {ref,defineEmits} from "vue";
import {useRouter} from "vue-router"
import request  from '@/api/request'
let router = useRouter();

let emits=defineEmits(["ref-table"])


let onSubmit=()=>{
            emits("ref-table",purchase_order)
}

let page=ref({
    current:1,
    size:2,
    total:0,
    records:[]
})

let columns = [
    {id:"name",label:"编号"},
    {id:"phone",label:"产品名称"}
]

let purchase_order=ref([])
//选择框事件
let fuxuankuang=(a)=>{
    purchase_order.value=a;
}
let location=()=>{
    alert("查询");
    // request({
    //     //查询客户
    //     url:"",
    //     method:"get",
    //     params:
    //         quotationId:quotationId.value
    // }).then(res=>{
    //     page.value=res.value
    // })
}

location();

</script>
<template>
    <div>
        <el-card>
            <template #header>
                <el-table :data="page.records" border stripe @selection-change="fuxuankuang">
                    <el-table-column type="selection" width="55"/>
                    <el-table-column v-for="col in columns"
                        :prop="col.id"
                        :key="col.id"
                        :label="col.label">
                    </el-table-column>
                </el-table>
                <el-button type="primary" @click="onSubmit">恢复</el-button>
            </template>
        </el-card>
    </div>
</template>
<style scoped>

.card_wrap {
    width: 98%;
    display: flex;
    flex-wrap: wrap;
    justify-content:flex-start;
}
.c_item{
    flex:1;
    margin:0px 5px 15px 0;
    width: calc((100%-0px)/2); 
    min-width:calc((100% - 10px)/2);
    max-width:calc((100% - 10px)/2);
}
</style>